<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <h1>GET</h1>
  <script>
    const xhr = new XMLHttpRequest()
    xhr.onreadystatechange = () => {
      console.log('onreadystatechange', xhr.readyState)
    }
    xhr.open('GET', 'http://localhost:3000/get')
    xhr.responseText = 'text'
    xhr.setRequestHeader('name', 'allen')
    xhr.onload = () => {
      console.log(xhr)
    }
    xhr.send()
  </script>
</body>

</html>